Intelligent lock that can set a key code by itself, a key which can be used for many locks and a setting tool thereof

ABSTRACT

An intelligent lock that can set a key code by itself, a key which can be used for many locks, as well as a setting tool are presented. The key may include a housing, a battery, a head, a group of contacts provided on the head, a non-volatile memory, and a special key code. The contacts for power supply and data transmission are connectable with two ends of the battery through respective wires. The intelligent lock system can easily set or cancel a key code by itself, and a single key can operatively replace many kinds of keys. The intelligent lock is cheap and easy to use.

FIELD OF THE INVENTION

The present invention relates to an intelligent electronic lockcontrolled by a microcomputer. The present invention can be widely usedin civil and industrial fields such as doors, drawers, cabinets, boxes,bags, transportation means, machineries and so on.

BACKGROUND OF THE INVENTION

Since locks were invented, locks have been playing an important role inpeople's daily life. Up to now, locks have two categories. One ismechanical lock and the other is electronic lock. The mechanical lockhas simple structure and low cost. However, the mechanical lock has badsecurity and high interactive opening rates. In addition, one lock canonly be opened by one key. Because of the development of modemmicro-electronic technology, the electronic lock was invented on thebasis of the mechanical lock. The electronic lock can increase thesecurity of lock and the interactive opening rate has almost reduced tozero. In addition, one electronic card can open many locks of the samekind. However, current electronic lock cannot set the key itself, and itneeds a desktop outside of the lock body to set the key. Therefore, theelectronic lock is not applicable in fields where the desktop is notavailable (such as a family door) or where people could not use computer(such as people at countryside, children or elder people). Later, thefingerprint electronic lock was invented on the basis of the normalelectronic lock. Though it is easy to open lock without a key, thefingerprint electronic lock is expensive, in large volume, andcomplicated in setting and resetting of fingerprints. In addition, boththe normal electronic lock and the fingerprint lock need battery orpower supply inside the lock, which can increase their volume. For suchreasons, the electronic lock can only be used for doors, but not fordrawers, cabinets, boxes, bags, transportation means, machinery, etc.,where volume is limited. Moreover, the expiration time period of abattery is about 1 to 1.5 years. If the battery in the electronic lockhas not been changed on time because of negligence, the lock may not beopened anymore and it will be unpleasant to pick the lock or break thedoor.

Conclusively, current existing locks including mechanical and electronicones, or even fingerprint electronic locks, have so many disadvantagesas mentioned above. In addition, they have no way to be simplified forone finger.

SUMMARY OF THE INVENTION

The object of the invention is to overcome disadvantages of locksmentioned above, and to provide an easy way to set or cancel the key bythe user himself. The present invention can unify all keys used to openvarious kinds of multi-purpose locks including door locks, drawer locks,cabinet locks, box and bag locks, traffic means locks, and machinerylocks, etc., into one intelligent electronic lock with low cost and easyoperation.

The technical solution of the invention is as follows:

The invention discloses an intelligent lock system comprising:

-   an electronic key including-   a housing (1),-   a battery (2),-   a head (5),-   a storing means (6), said storing means (6) including a non-volatile    memory which can store a special key code, and-   a group of contacts (4) setting on the head (5), said group of    contacts including a plurality of contacts; said contacts are used    for power supply and data transmission, and are connected with two    poles of the battery (2) and the storing means (6) by wires    respectively; and-   an intelligent lock including-   a housing (8),-   a lock hole (7),-   a lock tongue (9),-   a latch mechanism (10),-   a driving mechanism (11),-   a driving component (12),-   an electrical circuit board (15),-   a group of contacts (17) for electrical connection with the    electrical key, and-   a lock hole body (18),    wherein the electrical circuit board (15) is electrically connected    with the driving component (12) and the group of contacts (17), said    group of contacts (17) being set inside the lock hole (7) and used    for power supply and data transmission, said electrical circuit    board (15) including a storing means (13) for storing a plurality of    key codes and a control device (16) for controlling opening of the    lock and making setting or cancel operations upon the key,    wherein said control device (16) can read a key code stored in the    connected key by the group of contacts (17) and check whether the    key code stored in the connected key is identical with one of the    key codes in the storing means (13), and if a result is identical,    said control device (16) can drive the driving component (12) to    open the lock,    wherein said control device (16) can receive special signals and    execute the setting or cancel operations of the electronic key    according to the received special signals, and wherein there is only    one of the intelligent lock and the electronic key that can include    a switch device by which a user can execute different operations and    accordingly generate different special signals.

According to one embodiment, the control device (16) can connect anelectronic key which can open the lock via the lock hole (7) and receivethe first special signal and set a corresponding mark in onenon-volatile memory unit on the electrical circuit board (15) so thatthe control device (16) can store the key code of a second electronickey which is inserted after drawing out the previous key into thestoring means (13) according to the mark.

According to another embodiment, the control device (16) can connect anelectronic key which can open the lock via the lock hole (7) and receivea second special signal and clear out all key codes of the keys storedin the storing means (13) based on the second special signal.

According to another embodiment, the control device (16) can connect anelectronic key which can open the lock via the lock hole (7) and receivea third special signal and set a corresponding mark in one non-volatilememory unit on the electrical circuit board (15) so that the controldevice (16) can cancel the key code of a second electronic key which isinserted after drawing out the previous key into the storing means (13)according to the mark.

According to another embodiment, the control device (16) can connect anelectronic key which can open the lock via the lock hole (7) and receivea fourth special signal and clear out all key codes of the keys storedin the storing means (13) based on the second special signal.

According to one embodiment of the invention, the lock can be big orsmall or for any purposes, and the shape, size, structure and the mannerof electrical connection of the lock hole 7 are completely identical.Inside the lock, there is no battery or any power supply. The powersupply can be provided by the key. The different key codes stored in thestoring means 13 are generated when the lock is setting upon differentkeys respectively.

Said setting upon one key means giving a key the right to open one lockand storing the key code of said key into the memory of the storingmeans 13 of said lock. The process of setting can be referred as theregistration of the key code of the key in the lock. According to oneembodiment of the invention, only the key which has been registered inthe lock can open the lock, thus the process to open the lock is theprocess that the control device 16 in the lock makes check and confirmsthe key. Of course, the registration of the key can be cancelled thusthe process to cancel one key is the process that the control device 16in the lock clears out the key code of the key from the memory so as tocancel the right of the key to open the lock.

Accordingly, the necessary condition to open one lock by one key is tomake registration of the key code of the key in the lock. Therefore, thesize of the storing content of the storing means 13 in the lock decideshow many keys can be registered in one lock. If the length of the keycode is 56 bits in a binary coded system, one lock can make registrationof over ten thousand of keys based on present technical level of thestoring means (EEPROM).

According to one embodiment of the invention, said key can match a lockwhich is big or small or for any purpose. The shape, size, structure andthe manner of electrical connection of the head 5 are completelyidentical. The key code of the key is previously stored in the storingmeans of the key when it is manufactured. The length of the key code canbe decided according to the need of security. If the length of the keycode is designed at 56 bits in binary coded system, the length can be aslarger as several hundred quadrillion in the decimal coded system.

Therefore, it is almost impossible to have same key codes for any twokeys and each key will have its unique key code.

In order to increase the security, the storing means 6 can be realizedby a chip of microcomputer, which has functions of storage andcalculation. The key code is stored in the memory of the microcomputerand its operation mode has the protocol with the control device 16 inthe lock when it is manufactured. As a result, the original key codeinside the key is operated and secured by the microcomputer, and will beidentified by the lock and will be difficult to be decoded.

It is clear that for any key, no new data will be needed to write intothe key after it is manufactured. Therefore, the key can open as manylocks as needed.

The different lock systems are constructed by different setting andcancel manners. Based on the invention, though each key will have itsunique key code, it is not necessary that each key can only open aspecified lock after it is manufactured. Similarly, for each lock, it isnot necessary that each lock can only match a specified key. The key andlock in the invention can be in combination or separation at the user'sdiscretion. Among a lot of locks and a lot of keys, any key can be setas the key of any lock, and can be cancelled at any time as well. Thecombination of the key and the lock can be decided by the setting andcancel of the lock at user's discretion.

The invention further discloses an intelligent lock system comprising:

-   an electronic key including-   a housing (1),-   a battery (2),-   a head (5),-   a storing means (6), said storing means (6) including a non-volatile    memory which can store a special key code, and-   a group of contacts (4) setting on the head (5), said group of    contacts including a plurality of contacts; said contacts are used    for power supply and data transmission, and are connected with two    poles of the battery (2) and the storing means (6) by wires    respectively; and-   an intelligent lock including-   a housing (8),-   a lock hole (7),-   a lock tongue (9),-   a latch mechanism (10),-   a driving mechanism (11),-   a driving component (12),-   an electrical circuit board (15),-   a group of contacts (17) for electrical connection with the    electrical key, and-   a lock hole body (18),    wherein the electrical circuit board (15) is electrically connected    with the driving component (12) and the group of contacts (17), said    group of contacts (17) being set inside the lock hole (7) and used    for power supply and data transmission, said electrical circuit    board (15) including a storing means (13) for storing a plurality of    key codes and a control device (16) for controlling opening of the    lock and making setting or cancel operations upon the key,    wherein said control device (16) can read a key code stored in the    connected key by the group of contacts (17) and check whether the    key code stored in the connected key is identical with one of the    key codes in the storing means (13), and if a result is identical,    said control device (16) can drive the driving component (12) to    open the lock,    wherein said control device (16) can receive special signals and    execute the setting or cancel operations of the electronic key    according to the received special signals, and-   a connector which is used to make electrical connection between the    group of contacts of at least two electronic keys and the group of    contacts (17) inside the lock hole (7), said connector including a    housing (19), a plug (23) which can insert into the lock hole (7),    at least a first hole (20) and a second hole (21) in which key can    be inserted, wherein the plug (23) has a group of contacts (22), and    the first hole (20) and the second hole (22) include corresponding    contacts,    wherein there is only one of the intelligent lock, electronic key    and connector that can include a switch device by which a user can    execute different operations and accordingly generate different    special signals, and    wherein when the connector is inserted into the lock hole (7), the    control device (16) can read two key codes of two electronic keys    inserted into the first hole (20) and the second hole (21)    respectively, and when one of the key codes of keys is identical    with the key code stored in the storing means (13), said control    device (16) can store the key code of the other key into the storing    means (13).

The invention further disclosed an intelligent lock system comprising:

-   an electronic key including-   a housing (1),-   a battery (2),-   a head (5),-   a storing means (6), said storing means (6) including a non-volatile    memory which can store a special key code, and-   a group of contacts (4) setting on the head (5), said group of    contacts including a plurality of contacts; said contacts are used    for power supply and data transmission, and are connected with two    poles of the battery (2) and the storing means (6) by wires    respectively; and-   an intelligent lock including-   a housing (8),-   a lock hole (7),-   a lock tongue (9),-   a latch mechanism (10),-   a driving mechanism (11),-   a driving component (12),-   an electrical circuit board (15),-   a group of contacts (17) for electrical connection with the    electrical key, and-   a lock hole body (18),    wherein the electrical circuit board (15) is electrically connected    with the driving component (12) and the group of contacts (17), said    group of contacts (17) being set inside the lock hole (7) and used    for power supply and data transmission, said electrical circuit    board (15) including a storing means (13) for storing a plurality of    key codes and a control device (16) for controlling opening of the    lock and making setting or cancel operations upon the key,    wherein said control device (16) can read a key code stored in the    connected key by the group of contacts (17) and check whether the    key code stored in the connected key is identical with one of the    key codes in the storing means (13), and if a result is identical,    said control device (16) can drive the driving component (12) to    open the lock,    wherein said control device (16) can receive special signals and    execute the setting or cancel operations of the electronic key    according to the received special signals,-   a setting tool used together with an electronic key and an    intelligent lock, said setting tool including-   a housing (25),-   a keyhole (26),-   a connecting device (28) having one plug, and-   an integrated circuit (24) having a memory unit,    wherein the plug has a group of contacts (27) connecting with a lock    hole (7) of the intelligent lock when it is inserted, and a group of    contacts (27) in the keyhole (26) connecting with the connects of    the plug and the integrated circuit (24) which has a preset key code    of the setting tool,    wherein the storing means (13) includes a special memory unit for    storing the key code of the setting tool, and    wherein there is only one of the intelligent lock, electronic key    and the setting tool that can include a switch device by which a    user can execute different operations and accordingly generate    different special signals.

According to one embodiment the control device (16) can read the keycode of connected setting tool by the group of contacts (17) and checkwhether the key code of the setting tool is identical with the key codeof stored in the special memory unit of the storing means (13), ifidentical, the control device (16) shall execute setting or canceloperation upon the key or upon the setting tool at the same time basedon received special signal.

According to another embodiment, when the setting tool is inserted intothe lock hole of the intelligent lock and there is an electronic keyinserted into the keyhole (26), if the intelligent lock can confirm thekey code of the setting tool, the key code of the electronic keyinserted into the keyhole (26) of the setting tool shall be stored intothe intelligent lock.

According to another embodiment, when the setting tool is inserted intothe lock hole of the intelligent lock and there is an electronic keyinserted into the keyhole (26), if the intelligent lock can confirm thekey code of the setting tool, depending on different special signals thecontrol device (16) can clear out the key code of the key connected withthe intelligent lock or clear out all key codes of all keys.

According to another embodiment, the setting operation of the settingtool is to store the key code of the setting tool inserted into the lockinto the storing means (13); and the cancel operation of the settingtool is to clear out the key code of the setting tool inserted into thelock from the storing means (13).

According to another embodiment, when the setting tool is inserted intothe lock hole of the intelligent lock and there is an electronic keyinserted into the keyhole (26), if the storing means (13) has no keycode the setting tool, the control device (16) shall store the key codeof the setting tool into the special memory unit of the storing means(13).

The invention further discloses an intelligent lock system comprising:

-   an electronic key including-   a housing (1),-   a battery (2),-   a head (5),-   a storing means (6), said storing means (6) including a non-volatile    memory which can store a special key code, and-   a group of contacts (4) setting on the head (5), said group of    contacts including a plurality of contacts; said contacts are used    for power supply and data transmission, and are connected with two    poles of the battery (2) and the storing means (6) by wires    respectively; and-   an intelligent lock including-   a housing (8),-   a lock hole (7),-   a lock tongue (9),-   a latch mechanism (10),-   a driving mechanism (11),-   a driving component (12),-   an electrical circuit board (15),-   a group of contacts (17) for electrical connection with the    electrical key, and-   a lock hole body (18),    wherein the electrical circuit board (15) is electrically connected    with the driving component (12) and the group of contacts (17), said    group of contacts (17) being set inside the lock hole (7) and used    for power supply and data transmission, said electrical circuit    board (15) including a storing means (13) for storing a plurality of    key codes and a control device (16) for controlling opening of the    lock and making setting or cancel operations upon the key,    wherein said control device (16) can read a key code stored in the    connected key by the group of contacts (17) and check whether the    key code stored in the connected key is identical with one of the    key codes in the storing means (13), and if a result is identical,    said control device (16) can drive the driving component (12) to    open the lock, and-   a multi-digit switch device connected with the control device (16)    by which the user can enter a multi-digit key code into the control    device (16), the storing means (13) having a special key code unit    which is used to set or cancel the key, wherein the control device    (16) shall accept and check if the special key cord inputted by the    multi-digit switch device is identical with that stored in the    storing means (13), and execute setting or cancel operations of    corresponding electronic key.

The invention further discloses a setting tool used together with anelectronic key and an intelligent lock, comprising:

-   a housing (25),-   a keyhole (26),-   a connecting device (28) having one plug, and-   an integrated circuit (24) having a memory unit,    wherein the plug has a group of contacts (27) connecting with a lock    hole (7) of the intelligent lock when it is inserted, and a group of    contacts (27) in the keyhole (26) connecting with the connects of    the plug and the integrated circuit (24) which has a preset key code    of the setting tool.

According to one embodiment of the invention, the setting tool comprisesa switch device which can be operated by a user, and can generatespecial signals on the group of contacts (27) corresponding to differentoperations executed by the user.

The invention further discloses a method for setting upon an electronickey by an intelligent lock, said electronic key having a battery and aspecial key code, said intelligent lock having key codes of allelectronic keys which can open the lock, said method comprising:

-   -   1) acquiring power supply from at least one electronic key which        is connected with the intelligent lock;    -   2) judging a key code of the at least one electronic key if it        is identical with one of key codes previously stored in the        intelligent lock, if the key code of at least one electronic key        is identical with one of key codes stored in the intelligent        lock, allowing setting or cancel operation upon the electronic        key; and    -   3) executing corresponding setting or cancel operation by the        intelligent lock upon the electronic key based on the special        signal to make setting or cancel operation.

According to one embodiment, the executing setting or cancel operationuses the electrically connection of a medium connecting device betweenthe at least one electronic key and the intelligent lock.

According to another embodiment, one of the intelligent lock, electronickey, and connector includes a switch device by which a user can executedifferent operations and accordingly generate different special signals.

The invention further discloses a method for setting operation upon anelectronic key by an intelligent lock, the electronic key having abattery and a special key code, the intelligent lock having key codes ofall electronic keys which can open the lock and the key code of asetting tool, the setting tool being connected with the intelligent lockand the electronic key, said method comprising:

-   -   (1) acquiring power supply from the electronic key which is        connected with the intelligent lock;    -   (2) judging the key code of the setting tool if it is identical        with one of key codes of the setting tool previously stored in        the intelligent lock, if the key code of the setting tool is        identical with the key codes of the setting tool stored in the        intelligent lock, allowing setting or cancel operation upon the        electronic key and upon itself;    -   (3) executing setting or cancel operation.

According to one embodiment, when the setting operation is executed andwhen the setting tool is inserted into the lock hole of the intelligentlock and there is an electronic key inserted into the keyhole (26) ofthe setting tool, if the intelligent lock has stored the key code of thesetting tool, the key code of the electronic key which is inserted intothe insert hole of the setting tool (26) shall be stored into theintelligent lock.

According to another embodiment, when the cancel operation is executedand when the setting tool is inserted into the lock hole of theintelligent lock and there is an electronic key inserted into thekeyhole (26) of the setting tool, if the intelligent has stored the keycode of the setting tool, depending on different special signals thecontrol device (16) can clear out the key code of the key connected withthe intelligent lock, clear out all key codes of all keys, or clear outall key codes of all keys and the code of the setting tool.

According to another embodiment, when the setting tool is inserted intothe lock hole of the intelligent lock and there is an electronic keyinserted into the keyhole (26), if the storing means (13) has no keycode the setting tool, the control device (16) shall store the key codeof the setting tool into the special memory unit of the storing means(13).

According to another embodiment, the special signal is generated by auser from a switch device of the electronic key, the intelligent lock orthe setting tool.

Based on different habit and mentality of people to use the lock, thesetting and cancel manners of the key are accordingly different.Therefore, the invention provides four embodiments based on differentsetting and cancel manners:

1. The First Embodiment of the System—Key Setting Key (Offline Mode)

The user may use key to set key in offline mode by inserting the keyinto an intelligent lock. According to the first embodiment, a storingmeans 13 of the lock includes a power-failure reserve memory which isused to store manual operation signal (i.e. special signal) generatedbefore there is power failure. Meanwhile, there is only one switchdevice 3 mounted on the lock or on the key in the system, which is usedto generate manual operation signal (i.e. special signal) and isconnected with its electrical circuit.

2. The Second Embodiment of the System—Key Setting Key (Online Mode)

The user may use key to set key in online mode by a lock and a connectorwhich can connect corresponding contacts in parallel on their heads 5.The connector is used specially to set the key. The connector includes ahousing 19, a plug 23, a first hole 20, a second hole 21 and a group ofcontacts 22, which is distributed on the plug 23 and on the inner wallsof the first hole 20 and the second hole 21. The shape, size, structure,positions of contacts and the manner of electrical connection of theplug 23 are completely identical with that of the head 5 of the key. Theshape, size, structure, positions of contacts and the manner ofelectrical connection of the first hole 20 and the second hole 21 arecompletely identical with that of the lock hole 7. The contactsdistributed on the plug 23 and the contacts distributed on the same holeare insulated from each other and corresponding contacts of the threecomponents are connected in parallel by wires.

The control device 16 in the lock includes an inquiry identifier whichis used to inquire and identify if there is a second source of datainput. Meanwhile, there is only one switch device 3 mounted on the lock,on the key or on the connector, which is used to generate manualoperation signal and is connected with its electrical circuit.

3. The Third Embodiment of the System—Setting the Key by the SettingTool

Based on the second embodiment, the user may combine the connector andone of the keys into a whole, and remove the battery 2 in the key tosimplify the structure. The connection style of all components in theelectrical circuit is unchanged so that a setting tool which isspecially used to set the key is formed. The setting tool includes ahousing 25, and the connecting device 28, and an integrated circuit 24which stores the key code of the setting tool and is connected with theconnecting device 28.

Obviously, the third embodiment is similar with the second embodimentexcept the mechanical structure. The control device 16 includes aninquiry identifier which is used to inquire and identify if there is asecond source of data input. Meanwhile, there is only one switch device3 mounted on the lock, on the key or on the setting tool, which is usedto generate manual operation signal and is connected with the electricalcircuit.

4. The Fourth Embodiment of the System—Setting the Key by theMulti-digit Switch

The user may set the key by a multi-digit switch. The multi-digit switchdevice 3 on the lock is connected with the control device 16 to form anelectrical circuit in the system. The multi-digit switch device 3includes some independent switch devices which are combined into awhole, and each independent switch device can generate different data bysetting its buttons manually. These data can be binary coded system,decimal coded system or otherwise. The independent switch device of eachbit is connected accordingly with the input port of parallel data on thecontrol device 16 by the electrical circuit board 15. Such switchdevices are connected respectively with some input ports of paralleldata on the control device 16. Since the working state of eachindependent switch device is generated manually, a set of suchindependent switch devices can form a variable data generator, or a keycode generator or a second source of data input.

The advantages of the invention are as follows:

-   1. Since each key has its unique key code instead that the ordinal    electronic lock has its only lock code, the lock shall check the key    code of the key stored into the lock instead that the ordinal    electronic lock shall check the lock code stored into the key. Thus    the volume requirement of the storing means in the key to store data    is largely reduced, and it is possible for one key to open unlimited    locks.-   2. Since no data are needed to write into the key when the key is    manufactured, the setting and cancel of the key can be completed by    a lock. Thus it is possible, easy and convenient to set or cancel    the key on each lock.-   3. Since no battery or power supply is needed in the lock, the    unpleasant case to be forced to pick the lock or break the door due    to failure of the battery or power supply can be avoided.-   4. Since no battery or power supply is needed in the lock, the    volume of the lock can be largely reduced. Thus an electronic lock    can be popularized in those places where the volume of the lock is    confined (e.g. drawers, cabinets, boxes, bags, transportation means,    machineries and so on).-   5. Since the key can transmit the key code and have certain    mechanical strength, it can be suitable not only for the lock with    the handle to transmit the key code only, but also for the lock    without the handle to transmit the key code and to drive the lock    tongue to open the lock. The habit and mentality of people to use    the lock can remain.

BRIEF DESCRIPTION OF THE DRAWINGS

The present invention is illustrated by way of example and not intendedto be limited by the figures of the accompanying drawings in which likereferences indicate similar elements and in which:

FIG. 1 is the sectional view of the structure of the electronic keyaccording to one embodiment of the invention;

FIG. 2 is the sectional view of the structure of the intelligent lockaccording to another embodiment of the invention;

FIG. 3 is a block diagram of an electrical circuit according to a firstembodiment of the invention in which a switch device 3 is mounted on oneside of the key and is connected with a storing means 6;

FIG. 4 is the block diagram of the electrical circuit according to thefirst embodiment of the invention in which the switch device 3 ismounted on one side of the lock;

FIG. 5 is the block diagram of the electrical circuit according to thefirst embodiment of the invention in which the switch device 3 ismounted on one side of the key and is connected with contacts in thegroup of contacts 4;

FIG. 6 is the flow chart of a control device 16 according to the firstembodiment of the invention;

FIG. 7 is the cubic sectional view of the connector according to asecond embodiment of the invention;

FIG. 8 is the cubic sectional view of the setting tool according to athird embodiment of the invention;

FIG. 9 is the block diagram of the electrical circuit according to thesecond embodiment of the invention in which the switch device 3 ismounted on one side of the key;

FIG. 10 is the block diagram of the electrical circuit according to thesecond embodiment of the invention in which the switch device 3 ismounted on one side of the connector;

FIG. 11 is the flow chart of the control device 16 according to thesecond and the third embodiment of the invention;

FIG. 12 is the block diagram of the electrical circuit according to thethird embodiment of the invention;

FIG. 13 is the block diagram of the electrical circuit according to afourth embodiment of the invention;

FIG. 14 is the flow chart of the control device 16 according to thefourth embodiment of the invention.

DETAILED DESCRIPTION OF THE EMBODIMENTS

According to one embodiment, said setting operation of the electronickey is to store the key code of the connected electronic key into thestoring means (13) so that said electronic key can open the lock.

According to another embodiment, said cancel operation upon theelectronic key is to clear out the key codes stored in the storing means(13) so that the electronic keys corresponding to these key codes couldnot open the lock; or to clear out the key code of the connected key inthe storing means (13) so that the key corresponding to the key codecould not open the lock.

According to another embodiment, the intelligent lock further comprisesa switch device operated by a user, said switch device being connectedwith the control device (16) and generating special signalscorresponding to different operations by the user, said control device(16) executing setting or cancel operations corresponding to the keyaccording to said special signal.

According to another embodiment, the control device (16) can receive thespecial signal from the electronic key.

According to another embodiment, the control device (16) can receive thespecial signal from a setting tool.

According to another embodiment, the storing means (13) includes aspecial memory unit for storing the key code of the setting tool.

According to another embodiment, the control device (16) can read thekey code of connected setting tool by the group of contacts (17) andcheck whether the key code of the setting tool is identical with the keycode of stored in the special memory unit of the storing means (13), ifidentical, the control device (16) shall execute setting or canceloperation upon the key or upon the setting tool at the same time basedon received special signal.

According to another embodiment, the setting operation of the settingtool is to store the key code of the setting tool inserted into the lockinto the storing means (13) so that the control device (16) executessetting or cancel operation upon the setting tool or upon the keyconnected with the setting tool based on received special signal; andthe cancel operation of the setting tool is to clear out the key code ofthe setting tool inserted into the lock from the storing means (13) sothat the control device (16) could not execute setting or canceloperation upon the setting tool or the key connected with the settingtool.

According to another embodiment, the control device (16) can connect anelectronic key which can open the lock via the lock hole (7) and receivethe first special signal and set a corresponding mark in onenon-volatile memory unit on the electrical circuit board (15) so thatthe control device (16) can store the key code of a second electronickey which is inserted after drawing out the previous key into thestoring means (13) according to the mark.

According to another embodiment, the control device (16) can connect anelectronic key which can open the lock via the lock hole (7) and receivea second special signal and clear out all key codes of the keys storedin the storing means (13) based on the second special signal.

According to another embodiment, the intelligent lock further comprisesa connector which is used to make electrical connection between thegroup of contacts of at least two electronic keys and the group ofcontacts (17) inside the lock hole (7), said connector including ahousing (19), a plug (23) which can insert into the lock hole (7), atleast a first hole (20) and a second hole (21) in which key can beinserted, wherein the plug (23) has a group of contacts (22), and thefirst hole (20) and the second hole (22) include corresponding contacts.

According to another embodiment, the connector further includes a switchdevice which can be operated by a user and can generate special signalson the group of contacts (22) corresponding to different operations bythe user.

According to another embodiment, when the connector is inserted into thelock hole (7), the control device (16) can read two key codes of twoelectronic keys inserted into the first hole (20) and the second hole(21) respectively, and when one of the key codes of keys is identicalwith the key code stored in the storing means (13), said control device(16) can store the key code of the other key into the storing means(13).

According to another embodiment, the intelligent lock further comprisesa multi-digit switch device by which the user can enter multi-digit keycode into the control device (16), said switch device being connectedwith the control device (16) which can execute setting or canceloperations of corresponding electronic key based on the special key codeentered into the multi-digit switch device.

According to another embodiment, the setting tool further comprises aswitch device which can be operated by a user, and can generate specialsignals on the group of contacts (27) corresponding to differentoperations executed by the user.

According to another embodiment, the intelligent lock system furthercomprises a setting tool used together with an electronic key and anintelligent lock, said setting tool including

-   a housing (25),-   a keyhole (26),-   a connecting device (28) having one plug, and-   an integrated circuit (24) having a memory unit,    wherein the plug has a group of contacts (27) connecting with a lock    hole (7) of the intelligent lock when it is inserted, and a group of    contacts (27) in the keyhole (26) connecting with the connects of    the plug and the integrated circuit (24) which has a preset key code    of the setting tool, wherein when the setting tool is inserted into    the lock hole of the intelligent lock and there is an electronic key    inserted into the keyhole (26), if the intelligent lock can confirm    the key code of the setting tool, the key code of the electronic key    inserted into the keyhole (26) of the setting tool shall be stored    into the intelligent lock; and    wherein when the setting tool is inserted into the lock hole of the    intelligent lock and there is an electronic key inserted into the    keyhole (26), if the intelligent lock can confirm the key code of    the setting tool, depending on different special signals the control    device (16) can clear out the key code of the key connected with the    intelligent lock or clear out all key codes of all keys.

According to another embodiment, the control device (16) can read thekey code of connected setting tool by the group of contacts (17) andcheck whether the key code of the setting tool is identical with the keycode of stored in the special memory unit of the storing means (13), ifidentical, the control device (16) shall execute setting or canceloperation upon the key or upon the setting tool at the same time basedon received special signal.

According to another embodiment, the setting operation of the settingtool is to store the key code of the setting tool inserted into the lockinto the storing means (13) so that the control device (16) executessetting or cancel operation upon the setting tool or upon the keyconnected with the setting tool based on received special signal; andthe cancel operation of the setting tool is to clear out the key code ofthe setting tool inserted into the lock from the storing means (13) sothat the control device (16) could not execute setting or canceloperation upon the setting tool or the key connected with the settingtool.

According to another embodiment, when the setting tool is inserted intothe lock hole of the intelligent lock and there is an electronic keyinserted into the keyhole (26), if the storing means (13) has no keycode the setting tool, the control device (16) shall store the key codeof the setting tool into the special memory unit of the storing means(13).

According to another embodiment, the intelligent lock system furthercomprises a connector which is used to make electrical connectionbetween the group of contacts of at least two electronic keys and thegroup of contacts (17) inside the lock hole (7), said connectorincluding a housing (19), a plug (23) which can insert into the lockhole (7), at least a first hole (20) and a second hole (21) in which keycan be inserted, wherein the plug (23) has a group of contacts (22), andthe first hole (20) and the second hole (22) include correspondingcontacts.

According to another embodiment, there is only one of the intelligentlock, electronic key, setting tool and connector, can include a switchdevice by which a user can execute different operations and accordinglyand generate different special signals.

According to another embodiment, the control device (16) can connect anelectronic key which can open the lock via the lock hole (7) and receivethe first special signal and set a corresponding mark in onenon-volatile memory unit on the electrical circuit board (15) so thatthe control device (16) can store the key code of a second electronickey which is inserted after drawing out the previous key into thestoring means (13) according to another embodiment the mark.

According to another embodiment, the control device (16) can connect anelectronic key which can open the lock via the lock hole (7), and whenthe control device (16) receives a third special signal, the controldevice (16) shall clear out all key codes of keys stored in the storingmeans (13), and shall store the key code of the next electronic keywhich is inserted after drawing out the previous key into the storingmeans (13).

1. One Embodiment of the Structure of the Key

As shown on FIG. 1, a storing means 6 is an EEPROM-like memory, and aswitch device 3 can be included depending on the different technicalsolutions.

2. One Embodiment of the Structure of the Lock

As shown on FIG. 2, a storing means 13 is an EEPROM-like memory, and acontrol device 16 is a microcomputer (e.g. Series 89 etc.) on which theprogram is introduced. According to another embodiment, the storingmeans 13 and the control device 16 can be an integrated circuit whichmerges the storing means 13 and the microcomputer. The switch device 3can be included depending on the different technical solutions. In oneembodiment shown as FIG. 2, if the setting and cancel operations of thekey are not in consideration, the rule of opening the lock is asfollows. When a head 5 of the key is inserted into a lock hole 7, abattery 2 in the key shall provide power supply to the lock via a groupof contacts 4 and 17 by wires. The control device 16 of the system shallfirst ask for key codes when it is energized. The key shall input keycodes stored in the storing means 6 via the group of contacts 4 and 17into the control device 16. Then a data comparator in the control device16 shall make comparison one by one between the key code of the key andthose registered in the storing means 13. If none of registered keycodes is identical with the key code of the key, the control device 16will enter into the sleep mode and ignore the key. If one registered keycode is identical with the key code of the key, the control device 16shall output a timing pulse power supply to a driving component 12. Thedriving component 12 can be a motor or a magnet, and can transfer thedirection and form of the torque by a driving mechanism 11 to drive alatch mechanism 10 to make parallel motion so that the lock tongue 9 isshifted. At this time, when the user turns the key to drive the lockhole 7, the extension bar on the right side of the lock hole 7 shallbring the lock tongue 9 to move downward to open the lock. Once thetiming power supply outputted from the control device 16 to the drivingcomponent 12 reaches its preset time, the driving component 12 shall bedeenergized and the latch mechanism 10 shall press the lock tongue 9under the push of the spring. At this time, when the user turns the keyin reverse direction to rise up the lock tongue to a certain position,the left side of the latch mechanism 10 shall drop in to the recess ofthe lock tongue 9 again so that the lock is closed.

Of course, similar to current existing mechanical locks, it is alsocompletely practicable to use a handle to drive the lock hole 7 or use ahandle to directly drive the lock tongue to open or close the lock.

3. First Embodiment of the Key-lock System

The block diagrams of the electrical circuit of the first embodiment ofthe system are shown as in FIG. 3, FIG. 4 and FIG. 5. According to thefirst embodiment, the switch device 3 is used to generate manualoperation signal in the system. The installation position of the switchdevice 3 is flexible in the system. For example, the switch device 3 canbe mounted on the key side to connect with the storing means 6 (shown onFIG. 3), or to connect with corresponding contacts on the group ofcontacts 4 on the head 5 (shown on FIG. 5), so that the signal inputtedby the key can be changed when it is switched on or off by manualoperation. The switch device 3 can be also mounted on the lock toconnect with one data input terminal (shown on FIG. 4) of the controldevice 16 to change its input state by manual operation. As shown atFIG. 3, the switch device 3 is set on the key. The signal generated bymanual operation on the switch device 3 and transmitted to the controldevice 16 is called manual operation signal. In addition, there is apower-failure reserve memory on the storing means 13, which is used tostore manual operation signal generated before the there is apower-failure.

According to the first embodiment, the setting and cancel operations ofthe key are executed by the switch device 3. Setting and cancel signalscan be generated by different manual operations for completion.According to the first embodiment, the setting of the key is designed asfollows. The user inserts a key A which can open the lock into the lockhole 7 to open the lock, makes the switch device 3 to be switched on oroff three times within 3 seconds, and withdraws the key A from the lockhole, so that the key code of a key B which originally cannot open thekey is registered into the lock unconditionally and the key B can openthe lock. Meanwhile, the cancel of the key is designed as follows. Theuser uses the key A to open the lock and makes the switch device 3 to beswitched on or off continuously over 10 seconds, so that all key codesstored in the key code memory of the lock (including the key code of keyA itself) shall be cleared off. At this time, though all key codes inthe key code memory are cleared off, the system can unconditionallyregister the key code of any new key inserting in the lock, thus the newkey shall acquire the right of setting and cancel the lock. Of coursethe new key can give up such a right.

The lock made according to the first embodiment shall not need anydefined key for match when the lock is manufactured.

FIG. 6 is the flow chart of the control device 16 according to the firstembodiment. When the key is inserted into the lock hole 7, the wholesystem is energized and initialized. The control device 16 shall firstask for key codes of the key, and store the data inputted by the keyinto the cache A of the storing means 6. A data comparator of thecontrol device compares one by one between the data in the cache A andthose registered in the storing means 13. If one key code is identicalwith the data in the cache A, the power-failure reserve memory shall becleared and a timing pulse power supply to open the lock shall beoutputted to drive the driving element 12 to complete the action to openthe lock. A detection identifier shall make detection and identificationupon possible manual operation signals, that is to detect and identifywhether the switch device 3 is operated by a person. If that is thecase, the detection identifier shall identify which kind operation itis. If it is the setting operation of the key, the detection identifiershall set registration mark on the power-failure reserve memory. If itis the cancel operation of the key, the detection identifier shall clearoff all key codes stored in the key code memory in the storing means 13,and then set registration mark on the power-failure reserve memory. Ifmanual operation signal cannot be identified, the detection identifiershall detect continuously. If none of key codes in the key code memoryis identical with the data in the cache A in previous comparison, thepower-failure reserve memory shall be checked if there is registeredmark. If not, the system shall enter into the sleep mode. If yes, thedata in the cache A shall be stored in the key code memory and theregistered mark in the power-failure reserve memory shall then becleared off.

4. Second Embodiment of the Key-lock System

The block diagrams of the electrical circuit of the key-lock system areshown as FIG. 9 and FIG. 10. In the FIGS. 9 and 10, two keys areconnected in parallel with the lock by a connector. The cubic sectionalview of one embodiment of the connector is shown in FIG. 7. Similar tothe first embodiment, there is a switch device 3 to generate manualoperation signal. The installation position of the switch device 3 isflexible. For example, the switch device 3 can be mounted on the key(shown on FIG. 9) or on the connector (shown on FIG. 10), so that it canchange the signal inputted by the key when it is switched by manualoperation. The switch device 3 can also be mounted on the lock (Figureis omitted) to connect with one data input terminal of the controldevice 16 to change its input state by manual operation. FIG. 10 showsthat the switch device 3 is set on the connector. In addition, thecontrol device 16 can include an inquire identifier to inquire andidentify whether there is a second source of data input.

According to the second embodiment of the invention, the user can useone key A which can open the lock to set the lock so that key B can openthe lock as well. The user inserts two keys respectively into a firsthole 20 and a second hole 21 of the connector, and then inserts a plug23 of the connector into the lock hole 7. At this time batteries in twokeys are connected in parallel to provide power supply to the system.When the system is energized, it shall register the key code of the keyB into the lock unconditionally, so that the key B can then also openthe lock. Meanwhile, the cancel mode of the key is designed as follows.The user inserts the key A which can open the lock into any hole of theconnector, and inserts the plug 23 of the connector into the lock hole.The switch device 3 of the connector can be switched on or offcontinuously over 10 seconds, so that all key codes stored in the keycode memory of the lock except the key code of the key A shall becleared off. Therefore, only the key A can open the lock. According tothe second embodiment, there should be at least one key which can bematched with the lock and open it. Of course, the second embodiment canadopt a similar mode of the cancel with the first embodiment and doesnot need any defined key for match.

FIG. 11 is the flow chart of the control device 16 of the system in thesecond embodiment of the key-lock system. Referring to FIG. 11, when twokeys are connected with the lock by the connector, the system isswitched on and initialized. The inquire identifier in the controldevice 16 inquires and identifies if there is the second source of inputdata in the system. If the result of the inquiry is that there are 2sources of input data, the control device 16 will read the key code ofthe first key inserted into one insert hole of the connector and storethe key code into cache A. A comparator compares one by one between thedata in the cache A and those in the key code memory in the storingmeans 13. If the key code in the memory is identical with the data inthe cache A, the key code of the second key inserted into the anotherinsert hole will be stored into the cache B on the microcomputer 16.Then the data in the cache B will be stored into the storing means 13,so that the registration of the second key is completed. If none of thedata in the cache A is identical with the data in the key code memoryafter comparison, the key code of the second key inserted into theanother insert hole will be stored into the cache B, and the comparatorcompares one by one between the data in the cache B and those in the keycode memory. If one of data is identical with that in the cache B, thendata in the cache A shall be stored into the key code memory, so thatthe registration of the first key is completed. If none data in thecache B is identical with the data in the key code memory aftercomparison, it suggests that neither key can open the lock and thesystem shall enter into the sleep mode.

When only one key is connected into the system by the connector, thesystem is setup and the inquiry identifier shall inquire and identify ifthere is the second source of data input in the system and the result ofinquiry shall be: “Only One”. The input data from the key will be storedinto the cache A. The comparator shall compares one by one between thedata in the cache A and those in the key code memory. If none of data isidentical with the data in the cache A, the system shall enter into thesleep mode. If one of data is identical with that in the cache A, atiming pulse power supply to open the lock shall be outputted to drivethe driving element 12 to complete the action to open the lock. Thedetection identifier then makes detection and identification uponpossible manual operation signals, that is, to detect and identifywhether the switch device 3 is operated by a person. If somebody isoperating on the switch device 3 and operation requirements are met, alldata in the key code memory which are not identical with that in thecache A shall be cleared off. Therefore, all other key codes shall becancelled except the key code meeting operation requirements. If nomanual operation signal occurs in the system or the manual operationsignals are not in accordance with the requirement, the detectionidentifier shall detect continuously.

The third embodiment of the system is a mechanical structure deformationof the second embodiment of the system. FIG. 12 is a block diagram ofthe electrical circuit of third embodiment of the system. In addition,the cubic sectional view of the setting tool is shown on FIG. 8.Referring to FIG. 8, the setting tool includes a housing 25, anintegrated circuit 24, a connecting device 28, an insert hole 26, agroup of contacts 27 and wires. The group of contacts 27 distribute oninner walls of the connecting device 28 and the insert hole 26, and areinsulated from each other. The connecting device 28 takes the form ofthe plug. The connecting device 28 and the insert hole 26 are completelyidentical with the plug 23 and the first hole 20 or the second hole 21in the second embodiment regarding shape, size, structure, positions ofcontacts and the manner of electrical connection. Thus, as shown in FIG.7, each of the contacts comprising the group of contacts 22 set on theplug 23 or on the first hole 20 or on the second hole 21 is physicallyseparated from other contacts and electrically spaced apart so as to beinsulated from every other contact in the group of contacts 22.Similarly, as depicted in FIG. 2, each of the contacts comprising thegroup of contacts 17 set on the lock hole 7 is physically separated fromother contacts and electrically spaced apart so as to be insulated fromevery other contact in the group of contacts 17. Likewise, as depictedin FIG. 1, each of the contacts comprising the group of contacts 4 seton the head 5 is physically separated from other contacts andelectrically spaced apart so as to be insulated from every other contactin the group of contacts 4. The integrated circuit 24 stores the keycode of the setting tool and is connected with the connecting device 28.The key code of the setting tool is previously stored into the lock.

According to the third embodiment of the system, the user inserts thehead 3 of the key into the insert hole 26 of the setting tool, theninserts the connecting device 28 into the lock hole 7. Thus, the keycode of the key is registered into the lock unconditionally and the keycan open the lock. The style to cancel the key according to the thirdembodiment is the same with that according to the second embodiment. Forexample, when the switch device 3 is operated by person to be switchedon or off continuously over 10 seconds, all key codes stored in the keycode memory of the lock except the key code of the setting tool shall becleared off. Thus all other keys cannot open the lock. After the lock ismanufactured according to the third embodiment, there should be at leastone defined setting tool which can be matched with the lock. Of course,the third embodiment can adopt similar mode of the cancel with the firstembodiment and does not need any defined setting tool for match.

As shown on FIG. 12, the key, the lock and the setting tool areconnected in parallel to form the electrical circuit of the system. Incase when the electrical circuit is fixed, it is obviously that thesetting tool can be combined with the lock or with the key, so that thestructure of the setting tool can be changed into a way that the inserthole 26 can be omitted while the connecting device 28 can be changedinto a connector in other form. That is, there should be correspondingconnector on concerned lock or key to match with the connecting device.When the key is inserted into the lock, the setting tool shall beconnected with corresponding connector on the lock or on the key.

Similar with the first and the second embodiments of the system, thereis a switch device 3 to generate manual operation signal in the system.The installation position of the switch device 3 is flexible. It can bemounted on the key or the lock (Figure is omitted), or mounted on thesetting tool. Here the switch device 3 is mounted on the setting tool(shown on FIG. 12). In addition, there is an inquire identifier in thecontrol device 16 to inquire and identify if there is a second source ofdata input. Therefore, the third embodiment and the second embodimentare identical except the structure.

6. The Fourth Embodiment of the Key-lock System

Referring to FIG. 13, a multi-digit switch device 3 is connected withthe control device 16. According to the fourth embodiment, two kinds ofcodes are stored previously into the microcomputer 16 or the storingmeans 13 of the lock when the lock is manufactured. One code is thesetting code. To set the key, the user sets the data manually on themulti-digit switch device 3 to make them to be identical with thesetting code previously stored in the lock. Thus the key inserted intothe lock is registered into the lock unconditionally, and the key canthen open the lock. The other code is the cancel code. The user may setthe data manually on the multi-digit switch device 3 to make them to beidentical with the cancel code previously stored in the lock. Thus thekey inserted into the lock should open the lock, and all data stored inthe key code memory in the lock are cleared off. The multi-digit switchdevice 3 is mounted on the electrical circuit board 15. According to thefourth embodiment, the multi-digit switch device 3 has binary codesystem on each bit (only two states OFF and ON at the binary codeswitch). Whatever the setting or cancel of the key is finished, theoperator should set the switch randomly and keep the code in mind toprevent the code to be stolen by others.

FIG. 14 is the flow chart of the control device 16 according to thefourth embodiment of the system. When the key is inserted into the lockhole 7, the system is energized and initialized. The control device 16reads the key code inputted by the key, and stores the data into thecache A. A data comparator compares one by one between the data in thecache A and those registered data in the key code memory in the storingmeans 13. If one key code is identical with the data in the cache A, thetiming pulse power supply to open the lock shall be outputted to drivethe driving element 12 to open the lock. The detection identifier thenmakes detection and identification upon the data formed by themulti-digit switch device 3 to check if it is identical with the cancelcode. If not identical, the system shall enter into the sleep mode. Ifidentical, all key codes in the key code memory shall be cleared off. Ifnone of the data in the cache A is identical with the data in the keycode memory after comparison by the comparator, the detection identifiershall detect and identify the data formed by the multi-digit switchdevice 3 to check if it is identical with the setting code. If notidentical, the system shall go into sleep mode. If identical, the datein the cache A shall be stored into the key code memory to completesetting of the key.

Therefore, the invention includes four embodiments. Depending ondifferent habit and mentality of people to use the lock, themanufacturer can select one or several embodiments.

1. An intelligent lock system comprising: an electronic key including ahousing (1), a battery (2), a head (5), a storing means (6), saidstoring means (6) including a non-volatile memory which store a specialkey code, and a group of contacts (4) setting on the head (5), saidgroup of contacts including a plurality of contacts, wherein eachcontact is physically spaced apart and electrically insulated from othercontacts; said contacts are used for power supply and data transmission,and are connected with two poles of the battery (2) and the storingmeans (6) by wires respectively; and an intelligent lock including ahousing (8), a lock hole (7), a lock tongue (9), a latch mechanism (10),a driving mechanism (11), a driving component (12), an electricalcircuit board (15), a group of contacts (17) for electrical connectionwith the electrical key, wherein each contact is physically spaced apartand electrically insulated from other contacts, and a lock hole body(18), wherein the electrical circuit board (15) is electricallyconnected with the driving component (12) and the group of contacts(17), said group of contacts (17) being set inside the lock hole (7) andused for power supply and data transmission, said electrical circuitboard (15) including a storing means (13) for storing a plurality of keycodes and a control device (16) for controlling opening of the lock andmaking setting or cancel operations upon the key, wherein said controldevice (16) reads a key code stored in the connected key by the group ofcontacts (17) and checks whether the key code stored in the connectedkey is identical with one of the key codes in the storing means (13),and if a result is identical, said control device (16) drives thedriving component (12) to open the lock, wherein said control device(16) receives special signals and executes the setting or canceloperations of the electronic key according to the received specialsignals, and a connector which is used to make electrical connectionbetween the group of contacts of at least two electronic keys and thegroup of contacts (17) inside the lock hole (7), said connectorincluding a housing (19), a plug (23) which inserts into the lock hole(7), at least a first hole (20) and a second hole (21) in which key isinserted, wherein the plug (23) has a group of contacts (22), and thefirst hole (20) and the second hole (22) include corresponding contacts,wherein there is only one of the intelligent lock, electronic key andconnector that includes a switch by which a user executes differentoperations and accordingly generates different special signals, andwherein when the connector is inserted into the lock hole (7), thecontrol device (16) reads two key codes of two electronic keys insertedinto the first hole (20) and the second hole (21) respectively, and whenone of the key codes of keys is identical with the key code stored inthe storing means (13), said control device (16) stores the key code ofthe other key into the storing means (13).
 2. An intelligent lock systemcomprising: an electronic key including a housing (1), a battery (2), ahead (5), a storing means (6), said storing means (6) including anon-volatile memory which stores a special key code, and a group ofcontacts (4) setting on the head (5), said group of contacts including aplurality of contacts; said contacts are used for power supply and datatransmission, and are connected with two poles of the battery (2) andthe storing means (6) by wires respectively; and an intelligent lockincluding a housing (8), a lock hole (7), a lock tongue (9), a latchmechanism (10), a driving mechanism (11), a driving component (12), anelectrical circuit board (15), a group of contacts (17) for electricalconnection with the electrical key, and a lock hole body (18), whereinthe electrical circuit board (15) is electrically connected with thedriving component (12) and the group of contacts (17), said group ofcontacts (17) being set inside the lock hole (7) and used for powersupply and data transmission, said electrical circuit board (15)including a storing means (13) for storing a plurality of key codes anda control device (16) for controlling opening of the lock and makingsetting or cancel operations upon the key, wherein said control device(16) reads a key code stored in the connected key by the group ofcontacts (17) and checks whether the key code stored in the connectedkey is identical with one of the key codes in the storing means (13),and if a result is identical, said control device (16) drives thedriving component (12) to open the lock, wherein said control device(16) receives special signals and executes the setting or canceloperations of the electronic key according to the received specialsignals, a setting tool used together with an electronic key and anintelligent lock, said setting tool including a housing (25), a keyhole(26), a connecting device (28) having one plug, and an integratedcircuit (24) having a memory unit, wherein the plug has a group ofcontacts (27) connecting with a lock hole (7) of the intelligent lockwhen it is inserted, and a group of contacts (27) in the keyhole (26)connecting with the connects of the plug and the integrated circuit (24)which has a preset key code of the setting tool, wherein the storingmeans (13) includes a special memory unit for storing the key code ofthe setting tool, wherein there is only one of the intelligent lock,electronic key and the setting tool that includes a switch by which auser executes different operations and accordingly generates differentspecial signals; and wherein when the setting tool is inserted into thelock hole of the intelligent lock and there is an electronic keyinserted into the keyhole (26), if the intelligent lock confirms the keycode of the setting tool, the key code of the electronic key insertedinto the keyhole (26) of the setting tool shall be stored into theintelligent lock.
 3. The intelligent lock system according to claim 2,wherein the control device (16) reads the key code of connected settingtool by the group of contacts (17) and checks whether the key code ofthe setting tool is identical with the key code of stored in the specialmemory unit of the storing means (13), if identical, the control device(16) shall execute setting or cancel operation upon the key or upon thesetting tool at the same time based on received special signal.
 4. Theintelligent lock system according to claim 2, wherein when the settingtool is inserted into the lock hole of the intelligent lock and there isan electronic key inserted into the keyhole (26), if the intelligentlock confirms the key code of the setting tool, depending on differentspecial signals the control device (16) clears out the key code of thekey connected with the intelligent lock or clear out all key codes ofall keys.
 5. The intelligent lock according to claim 3, wherein thesetting operation of the setting tool is to store the key code of thesetting tool inserted into the lock into the storing means (13); and thecancel operation of the setting tool is to clear out the key code of thesetting tool inserted into the lock from the storing means (13).
 6. Theintelligent lock system according to claim 2 or 5, wherein when thesetting tool is inserted into the lock hole of the intelligent lock andthere is an electronic key inserted into the keyhole (26), if thestoring means (13) has no key code the setting tool, the control device(16) shall store the key code of the setting tool into the specialmemory unit of the storing means (13).
 7. A method for setting operationupon an electronic key by an intelligent lock, the electronic key havinga battery and a special key code, the intelligent lock having key codesof all electronic keys which opens the lock and the key code of asetting tool, the setting tool being connected with the intelligent lockand the electronic key, said method comprising: (1) acquiring powersupply from the electronic key which is connected with the intelligentlock via a group of contacts, wherein each contact in the group isphysically spaced apart and electrically insulated from other contacts;(2) judging the key code of the setting tool if it is identical with oneof key codes of the setting tool previously stored in the intelligentlock, if the key code of the setting tool is identical with the keycodes of the setting tool stored in the intelligent lock, allowingsetting or cancel operation upon the electronic key and upon itself; (3)executing setting or cancel operation; and when the setting operation isexecuted and when the setting tool is inserted into the lock hole of theintelligent lock and there is an electronic key inserted into thekeyhole (26) of the setting tool, if the intelligent lock has stored thekey code of the setting tool, the key code of the electronic key whichis inserted into the insert hole of the setting tool (26) shall bestored into the intelligent lock.
 8. The method according to claim 7,wherein when the cancel operation is executed and when the setting toolis inserted into the lock hole of the intelligent lock and there is anelectronic key inserted into the keyhole (26) of the setting tool, ifthe intelligent has stored the key code of the setting tool, dependingon different special signals the control device (16) clears out the keycode of the key connected with the intelligent lock, clears out all keycodes of all keys, or clears out all key codes of all keys and the codeof the setting tool.
 9. The method according to claim 7, wherein whenthe setting tool is inserted into the lock hole of the intelligent lockand there is an electronic key inserted into the keyhole (26), if thestoring means (13) has no key code the setting tool, the control device(16) shall store the key code of the setting tool into the specialmemory unit of the storing means (13).
 10. The method according to claim7, wherein the special signal is generated by a user from a switch ofthe electronic key, the intelligent lock or the setting tool.